# Maintainer: Anatol Pomozov
# Contributor: Keinv Yue <yuezk001@gmail.com>

pkgname=globalprotect-openconnect
pkgver=1.4.9
pkgrel=1
pkgdesc="A GlobalProtect VPN GUI client based on Openconnect and built with Qt5, supports SAML auth mode"
arch=(loong64 x86_64)
url="https://github.com/yuezk/GlobalProtect-openconnect"
license=(GPL3)
depends=(openconnect qt5-base qt5-webengine qt5-websockets qtkeychain-qt5)
makedepends=(git cmake)
provides=(gpclient gpservice)
backup=(etc/gpservice/gp.conf)
source=(git+https://github.com/yuezk/GlobalProtect-openconnect#tag=v$pkgver) # github does not allow to download sources with submodules, thus use git directly
sha256sums=('SKIP')

build() {
  cd GlobalProtect-openconnect
  cmake -B build -DCMAKE_BUILD_TYPE=Release
  cmake --build build
}

package() {
  cd GlobalProtect-openconnect
  make DESTDIR="$pkgdir/" install -C build
}
